﻿using DFGK_WMS.Context;
using Microsoft.EntityFrameworkCore;

namespace DFGJ.WMS_PDA.WebAPI.Extensions
{
    /// <summary>
    /// EFCore扩展
    /// </summary>
    public static class EFCoreExtend
    {
        /// <summary>
        ///  注入EFCore
        /// </summary>
        /// <param name="builder"></param>
        public static void AddEFCoreSetUp(this WebApplicationBuilder builder)
        {
            builder.Services.AddDbContext<DFGK_DB>(x =>
            x.UseSqlServer(builder.Configuration.GetConnectionString("DFGK_WMS")));
        }
    }
}
